home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / e_mac / prims_cgi.c < prev    next >
Encoding:
Text File  |  1997-07-24  |  8.6 KB  |  461 lines  |  [TEXT/CWIE]

  1. // 24Jul97 e
  2.  
  3. #include "mlvalues.h"
  4. #include "prims.h"
  5.  
  6. extern value compare();
  7. extern value equal();
  8. extern value notequal();
  9. extern value lessthan();
  10. extern value lessequal();
  11. extern value greaterthan();
  12. extern value greaterequal();
  13. extern value extern_val();
  14. extern value extern_compact_val();
  15. extern value format_float();
  16. extern value float_of_string();
  17. extern value exp_float();
  18. extern value log_float();
  19. extern value sqrt_float();
  20. extern value power_float();
  21. extern value sin_float();
  22. extern value cos_float();
  23. extern value tan_float();
  24. extern value asin_float();
  25. extern value acos_float();
  26. extern value atan_float();
  27. extern value atan2_float();
  28. extern value gc_stat();
  29. extern value gc_get();
  30. extern value gc_set();
  31. extern value gc_minor();
  32. extern value gc_major();
  33. extern value gc_full_major();
  34. extern value hash_univ_param();
  35. extern value intern_val();
  36. extern value int_of_string();
  37. extern value format_int();
  38. extern value open_descriptor();
  39. extern value channel_descriptor();
  40. extern value channel_size();
  41. extern value flush();
  42. extern value output_char();
  43. extern value output_int();
  44. extern value output();
  45. extern value seek_out();
  46. extern value pos_out();
  47. extern value close_out();
  48. extern value input_char();
  49. extern value input_int();
  50. extern value input();
  51. extern value seek_in();
  52. extern value pos_in();
  53. extern value close_in();
  54. extern value input_scan_line();
  55. extern value get_next_char();
  56. extern value start_interp();
  57. extern value realloc_global();
  58. extern value static_alloc();
  59. extern value static_free();
  60. extern value static_resize();
  61. extern value obj_is_block();
  62. extern value obj_block();
  63. extern value available_primitives();
  64. extern value parse_engine();
  65. extern value create_string();
  66. extern value compare_strings();
  67. extern value blit_string();
  68. extern value fill_string();
  69. extern value is_printable();
  70. extern value sys_exit();
  71. extern value sys_open();
  72. extern value sys_close();
  73. extern value sys_remove();
  74. extern value sys_rename();
  75. extern value sys_chdir();
  76. extern value sys_getenv();
  77. extern value sys_system_command();
  78. extern value sys_catch_break();
  79.  
  80. extern value sml_equal();
  81. extern value sml_not_equal();
  82. extern value sml_system();
  83. extern value sml_abs_int();
  84. extern value sml_floor();
  85. extern value sml_ceil();
  86. extern value sml_round();
  87. extern value sml_trunc();
  88. extern value sml_abs_real();
  89. extern value sml_sqrt();
  90. extern value sml_sin();
  91. extern value sml_cos();
  92. extern value sml_exp();
  93. extern value sml_ln();
  94. extern value sml_int_of_string();
  95. extern value sml_concat();
  96. extern value sml_chr();
  97. extern value sml_ord();
  98. extern value sml_float_of_string();
  99. extern value sml_string_of_int();
  100. extern value sml_string_of_float();
  101. extern value sml_makestring_of_char();
  102. extern value sml_makestring_of_string();
  103. extern value sml_getrealtime();
  104. extern value sml_getrutime();
  105. extern value sml_errno();
  106. extern value sml_getdir();
  107. extern value sml_mkdir();
  108. extern value sml_rmdir();
  109. extern value sml_opendir();
  110. extern value sml_rewinddir();
  111. extern value sml_readdir();
  112. extern value sml_closedir();
  113. extern value sml_isdir();
  114. extern value sml_modtime();
  115. extern value sml_settime();
  116. extern value sml_access();
  117. extern value sml_tmpnam();
  118. extern value sml_errormsg();
  119. extern value sml_asin();
  120. extern value sml_acos();
  121. extern value sml_atan2();
  122. extern value sml_pow();
  123. extern value sml_localtime();
  124. extern value sml_gmtime();
  125. extern value sml_mktime();
  126. extern value sml_asctime();
  127. extern value sml_strftime();
  128. extern value sml_general_string_of_float();
  129. extern value sml_filesize();
  130. extern value sml_int_of_hex();
  131. extern value sml_word_of_hex();
  132. extern value sml_word_of_dec();
  133. extern value sml_hexstring_of_word();
  134. extern value sml_sinh();
  135. extern value sml_cosh();
  136. extern value sml_tanh();
  137. extern value sml_realpath();
  138. extern value sml_uname();
  139. extern value sml_islink();
  140. extern value sml_readlink();
  141. extern value sml_devinode();
  142.  
  143. extern value md5sum();
  144.  
  145. extern value get_timer();
  146. extern value beg_timer();
  147. extern value end_timer();
  148. extern value clr_timer();
  149.  
  150. extern value mac_OSACompile();
  151. extern value mac_OSAExecute();
  152. extern value mac_OSADispose();
  153. extern value mac_OSADisplay();
  154. extern value mac_OSAScriptError();
  155.  
  156. c_primitive cprim[] = {
  157.   compare,
  158.   equal,
  159.   notequal,
  160.   lessthan,
  161.   lessequal,
  162.   greaterthan,
  163.   greaterequal,
  164.   extern_val,
  165.   extern_compact_val,
  166.   format_float,
  167.   float_of_string,
  168.   exp_float,
  169.   log_float,
  170.   sqrt_float,
  171.   power_float,
  172.   sin_float,
  173.   cos_float,
  174.   tan_float,
  175.   asin_float,
  176.   acos_float,
  177.   atan_float,
  178.   atan2_float,
  179.   gc_stat,
  180.   gc_get,
  181.   gc_set,
  182.   gc_minor,
  183.   gc_major,
  184.   gc_full_major,
  185.   hash_univ_param,
  186.   intern_val,
  187.   int_of_string,
  188.   format_int,
  189.   open_descriptor,
  190.   channel_descriptor,
  191.   channel_size,
  192.   flush,
  193.   output_char,
  194.   output_int,
  195.   output,
  196.   seek_out,
  197.   pos_out,
  198.   close_out,
  199.   input_char,
  200.   input_int,
  201.   input,
  202.   seek_in,
  203.   pos_in,
  204.   close_in,
  205.   input_scan_line,
  206.   get_next_char,
  207.   start_interp,
  208.   realloc_global,
  209.   static_alloc,
  210.   static_free,
  211.   static_resize,
  212.   obj_is_block,
  213.   obj_block,
  214.   available_primitives,
  215.   parse_engine,
  216.   create_string,
  217.   compare_strings,
  218.   blit_string,
  219.   fill_string,
  220.   is_printable,
  221.   sys_exit,
  222.   sys_open,
  223.   sys_close,
  224.   sys_remove,
  225.   sys_rename,
  226.   sys_chdir,
  227.   sys_getenv,
  228.   sys_system_command,
  229.   sys_catch_break,
  230.  
  231.   sml_equal,
  232.   sml_not_equal,
  233.   sml_system,
  234.   sml_abs_int,
  235.   sml_floor,
  236.   sml_ceil,
  237.   sml_round,
  238.   sml_trunc,
  239.   sml_abs_real,
  240.   sml_sqrt,
  241.   sml_sin,
  242.   sml_cos,
  243.   sml_exp,
  244.   sml_ln,
  245.   sml_int_of_string,
  246.   sml_concat,
  247.   sml_chr,
  248.   sml_ord,
  249.   sml_float_of_string,
  250.   sml_string_of_int,
  251.   sml_string_of_float,
  252.   sml_makestring_of_char,
  253.   sml_makestring_of_string,
  254.   sml_getrealtime,
  255.   sml_getrutime,
  256.   sml_errno,
  257.   sml_getdir,
  258.   sml_mkdir,
  259.   sml_rmdir,
  260.   sml_opendir,
  261.   sml_rewinddir,
  262.   sml_readdir,
  263.   sml_closedir,
  264.   sml_isdir,
  265.   sml_modtime,
  266.   sml_settime,
  267.   sml_access,
  268.   sml_tmpnam,
  269.   sml_errormsg,
  270.   sml_asin,
  271.   sml_acos,
  272.   sml_atan2,
  273.   sml_pow,
  274.   sml_localtime,
  275.   sml_gmtime,
  276.   sml_mktime,
  277.   sml_asctime,
  278.   sml_strftime,
  279.   sml_general_string_of_float,
  280.   sml_filesize,
  281.   sml_int_of_hex,
  282.   sml_word_of_hex,
  283.   sml_word_of_dec,
  284.   sml_hexstring_of_word,
  285.   sml_sinh,
  286.   sml_cosh,
  287.   sml_tanh,
  288.   sml_realpath,
  289.   sml_uname,
  290.   sml_islink,
  291.   sml_readlink,
  292.   sml_devinode,
  293.  
  294.   md5sum,
  295.  
  296.   get_timer,
  297.   beg_timer,
  298.   end_timer,
  299.   clr_timer,
  300.  
  301.   mac_OSACompile,
  302.   mac_OSAExecute,
  303.   mac_OSADispose,
  304.   mac_OSADisplay,
  305.   mac_OSAScriptError,
  306.  
  307.   0 };
  308.  
  309. char * names_of_cprim[] = {
  310.   "compare",
  311.   "equal",
  312.   "notequal",
  313.   "lessthan",
  314.   "lessequal",
  315.   "greaterthan",
  316.   "greaterequal",
  317.   "extern_val",
  318.   "extern_compact_val",
  319.   "format_float",
  320.   "float_of_string",
  321.   "exp_float",
  322.   "log_float",
  323.   "sqrt_float",
  324.   "power_float",
  325.   "sin_float",
  326.   "cos_float",
  327.   "tan_float",
  328.   "asin_float",
  329.   "acos_float",
  330.   "atan_float",
  331.   "atan2_float",
  332.   "gc_stat",
  333.   "gc_get",
  334.   "gc_set",
  335.   "gc_minor",
  336.   "gc_major",
  337.   "gc_full_major",
  338.   "hash_univ_param",
  339.   "intern_val",
  340.   "int_of_string",
  341.   "format_int",
  342.   "open_descriptor",
  343.   "channel_descriptor",
  344.   "channel_size",
  345.   "flush",
  346.   "output_char",
  347.   "output_int",
  348.   "output",
  349.   "seek_out",
  350.   "pos_out",
  351.   "close_out",
  352.   "input_char",
  353.   "input_int",
  354.   "input",
  355.   "seek_in",
  356.   "pos_in",
  357.   "close_in",
  358.   "input_scan_line",
  359.   "get_next_char",
  360.   "start_interp",
  361.   "realloc_global",
  362.   "static_alloc",
  363.   "static_free",
  364.   "static_resize",
  365.   "obj_is_block",
  366.   "obj_block",
  367.   "available_primitives",
  368.   "parse_engine",
  369.   "create_string",
  370.   "compare_strings",
  371.   "blit_string",
  372.   "fill_string",
  373.   "is_printable",
  374.   "sys_exit",
  375.   "sys_open",
  376.   "sys_close",
  377.   "sys_remove",
  378.   "sys_rename",
  379.   "sys_chdir",
  380.   "sys_getenv",
  381.   "sys_system_command",
  382.   "sys_catch_break",
  383.  
  384.   "sml_equal",
  385.   "sml_not_equal",
  386.   "sml_system",
  387.   "sml_abs_int",
  388.   "sml_floor",
  389.   "sml_ceil",
  390.   "sml_round",
  391.   "sml_trunc",
  392.   "sml_abs_real",
  393.   "sml_sqrt",
  394.   "sml_sin",
  395.   "sml_cos",
  396.   "sml_exp",
  397.   "sml_ln",
  398.   "sml_int_of_string",
  399.   "sml_concat",
  400.   "sml_chr",
  401.   "sml_ord",
  402.   "sml_float_of_string",
  403.   "sml_string_of_int",
  404.   "sml_string_of_float",
  405.   "sml_makestring_of_char",
  406.   "sml_makestring_of_string",
  407.   "sml_getrealtime",
  408.   "sml_getrutime",
  409.   "sml_errno",
  410.   "sml_getdir",
  411.   "sml_mkdir",
  412.   "sml_rmdir",
  413.   "sml_opendir",
  414.   "sml_rewinddir",
  415.   "sml_readdir",
  416.   "sml_closedir",
  417.   "sml_isdir",
  418.   "sml_modtime",
  419.   "sml_settime",
  420.   "sml_access",
  421.   "sml_tmpnam",
  422.   "sml_errormsg",
  423.   "sml_asin",
  424.   "sml_acos",
  425.   "sml_atan2",
  426.   "sml_pow",
  427.   "sml_localtime",
  428.   "sml_gmtime",
  429.   "sml_mktime",
  430.   "sml_asctime",
  431.   "sml_strftime",
  432.   "sml_general_string_of_float",
  433.   "sml_filesize",
  434.   "sml_int_of_hex",
  435.   "sml_word_of_hex",
  436.   "sml_word_of_dec",
  437.   "sml_hexstring_of_word",
  438.   "sml_sinh",
  439.   "sml_cosh",
  440.   "sml_tanh",
  441.   "sml_realpath",
  442.   "sml_uname",
  443.   "sml_islink",
  444.   "sml_readlink",
  445.   "sml_devinode",
  446.  
  447.   "md5sum",
  448.  
  449.   "get_timer",
  450.   "beg_timer",
  451.   "end_timer",
  452.   "clr_timer",
  453.  
  454.   "mac_OSACompile",
  455.   "mac_OSAExecute",
  456.   "mac_OSADispose",
  457.   "mac_OSADisplay",
  458.   "mac_OSAScriptError",
  459.  
  460.   (char *) 0 };
  461.